/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package managed;

import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
import session.PasswordForgottenBean;
import session.PasswordForgottenBeanLocal;

/**
 *
 * @author antonio
 */
@Named(value = "passwordForgottenController")
@RequestScoped
public class PasswordForgottenControllerBean {

    @EJB
    private PasswordForgottenBeanLocal passwordForgottenBean;
    private String username;

    /**
     * Creates a new instance of PasswordForgottenControllerBean
     */
    public PasswordForgottenControllerBean() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {

        this.username = username;
    }

    public void sendPassword() {

        this.passwordForgottenBean.sendNewPassword(this.username);
    }
}
